//
//  LGSijiChosedTypeCollectionViewCell.m
//  ligenyun
//
//  Created by Mac on 2018/3/24.
//  Copyright © 2018年 stoneobs@icloud.com. All rights reserved.
//

#import "LGSijiChosedTypeCollectionViewCell.h"

@interface LGSijiChosedTypeCollectionViewCell()
@property(nonatomic, strong) UIImageView                     *bannerImageView;
@property(nonatomic, strong) STLabel                     *moneyLable;
@end
@implementation LGSijiChosedTypeCollectionViewCell
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self configSubView];
    }
    return self;
}
+ (CGFloat)itemHeight{
    return 144;
}
#pragma mark --subView
- (void)configSubView{
    CGFloat itemWith =  UIScreenWidth / 2;
    self.bannerImageView = [[UIImageView alloc] initWithFrame:CGRectMake(15, 0, itemWith  - 15  - 8, 100)];
    self.bannerImageView.image = [UIImage imageNamed:@"1"];
    [self addSubview:self.bannerImageView];
    
    STLabel * titleLable = [[STLabel alloc] initWithFrame:CGRectMake(15, self.bannerImageView.bottom, 200, 44)
                                                     text:@"100李根比"
                                                textColor:FirstTextColor
                                                     font:13
                                              isSizetoFit:NO
                                            textAlignment:NSTextAlignmentLeft];
    [self addSubview:titleLable];
    self.moneyLable = titleLable;
    
    self.chosedButton = [[STButton alloc] initWithFrame:CGRectMake(0, 0, 60, 30)
                                                     title:@"选择模板"
                                                titleColor:FlatWhite
                                                 titleFont:13
                                              cornerRadius:4
                                           backgroundColor:FlatRed
                                           backgroundImage:nil
                                                     image:nil];
    self.chosedButton.right = self.bannerImageView.right;
    self.chosedButton.centerY = titleLable.centerY;
    self.chosedButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentCenter;
    [self addSubview:self.chosedButton];
}
@end
